%% derivative symbolicly
syms u(x) k
a=exp(1i*k*x)*u(x);
f=diff(a,x,2);
latex(f)